package com.iaiai.imail.core;

import android.os.Environment;

/**
 * 
 * <p>
 * Title: Attribute.java
 * </p>
 * <p>
 * E-Mail: 176291935@qq.com
 * </p>
 * <p>
 * QQ: 176291935
 * </p>
 * <p>
 * Http: iaiai.iteye.com
 * </p>
 * <p>
 * Create time: 2012-9-28 下午2:41:54
 * </p>
 * 
 * @author 丸子
 * @version 0.0.1
 */
public class Attribute {

	/**
	 * 获得sdcard的根路径
	 * 
	 * @return
	 */
	public static String getSdCard() {
		return Environment.getExternalStorageDirectory().getAbsolutePath();
	}

	/**
	 * 是否存在sdcard卡
	 * 
	 * @return true有，false没有
	 */
	public static boolean isSdCard() {
		return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);
	}

	/**
	 * 是否可写入sdcard
	 * 
	 * @return true是，false否
	 */
	public static boolean isSdCardWrite() {
		return Environment.MEDIA_MOUNTED.endsWith(Environment.getExternalStorageState());
	}

}
